<template>
  <div class="box">
    <div class="top">
      <van-nav-bar
       border
      z-index="101"
      fixed
        title="活动管理"
        left-text="返回"
        right-text="首页"
        left-arrow
        @click-left="onClickLeft"
        @click-right="onClickRight"
      />
    </div>
    <div v-html="html"></div>
  </div>
</template>

<script>
import { ActiveDetail } from "@/service/active/active";
import nav from "@/mixin/nav"

export default {
    mixins:[nav],
  data() {
    return {
      html: "",
    };
  },
  methods: {
    //头部方法
    onClickLeft() {
      this.$router.go(-1);
    },
    onClickRight() {
      this.$router.push("/");
    },
  },
  async created() {
    let id = this.$route.params.id;
    // console.log(id);

    let { data } = await ActiveDetail(id);
    //   console.log(data);
    this.html = { data }.data.data.content;
    // console.log(this.html);
  },
};
</script>

<style scoped>
.top{
    margin-bottom: 50px;
}
</style>